hope you doing great.
I just tried using babel and webpack but for some reason it doesn't work. I even bought a new computer but no change...
Every time I start running the webpack command (node_modules/.bin/webpack). I am getting the error: C:\node_modules doesn't exist or is not a directory
The same happens when I using babel without webpack: The "node_modules" command is either misspelled or could not be found. (I am calling a start script from package.json file here - node_modules/.bin/babel ./src/index.js -o ./dist/assets/bundle.js)
The path clearly exsists on my computer. Also I checked several times that I am in the correct folder in my terminal... My package.json file looks like this:
{
"name": "chapter_19",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"babel": "node_modules/.bin/babel ./src/index.js -o ./dist/assets/bundle.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/preset-env": "^7.3.4"
},
"dependencies": {
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2"
}
}
Here's my webpack file:
const path = require('path');
module.exports = {
entry:':/src/index.js',
output:{
path: path.resolve(__dirname, 'dist/assets'),
filename: 'bundle.js'
}
}
And my files/folders image
Does someome maybe what's going on here?
Help would be greatly greatly appreciated.Thanks.